import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import monacoEditorPlugin from 'vite-plugin-monaco-editor-esm'

// https://vite.dev/config/
export default defineConfig({
 plugins: [
    vue(),
    monacoEditorPlugin({
      languageWorkers: ['editorWorkerService'],
      customWorkers: [{
        label: 'yaml',
        entry: 'monaco-yaml/yaml.worker'
      }]
    })
  ],
  base: './',
  build: {
    rollupOptions: {
      output: {
        entryFileNames: 'assets/index.js',
        chunkFileNames: 'assets/[name].js',
        assetFileNames: 'assets/index.[ext]'
      }
    }
  }
});